﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ApproveJoin.aspx.vb" Inherits="ExpWeb.ApproveJoin" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div class="row">
        <div class="col-md-6">
            <h3>Approve Request Join</h3>
        </div>
    </div>

    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="view0" runat="server">

            <div class="row">
                <div class="col-md-12">
                    <div class="col-md-3">
                        <div class="form-group">
                            <label>Requestor :</label>
                            <asp:TextBox ID="txtRequestor" runat="server" CssClass="form-control"></asp:TextBox>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group has-feedback">
                            <label>Join date :</label>
                            <asp:TextBox ID="txtCheckinDateView0" runat="server" CssClass="form-control"></asp:TextBox>
                            <span class="glyphicon glyphicon-calendar form-control-feedback" aria-hidden="true"></span>
                            <ajax:CalendarExtender ID="cldCheckinDateView0" runat="server" TargetControlID="txtCheckinDateView0" Format="dd MMM yyyy"></ajax:CalendarExtender>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group has-feedback">
                            <label>Expire date :</label>
                            <asp:TextBox ID="txtCheckoutDateView0" runat="server" CssClass="form-control"></asp:TextBox>
                            <span class="glyphicon glyphicon-calendar form-control-feedback" aria-hidden="true"></span>
                            <ajax:CalendarExtender ID="cldCheckoutDateView0" runat="server" TargetControlID="txtCheckoutDateView0" Format="dd MMM yyyy"></ajax:CalendarExtender>
                        </div>
                    </div>
                    <div class="col-md-3">
                                <div class="form-group">
                                    <label>Status :</label>
                                    <asp:DropDownList ID="ddl_StatusSearch" runat="server" CssClass="form-control">
                                        <asp:ListItem Value=""></asp:ListItem>
                                        <asp:ListItem Value="REQUEST">REQUEST</asp:ListItem>
                                        <asp:ListItem Value="APPROVE">APPROVE</asp:ListItem>
                                        <asp:ListItem Value="REJECT">REJECT</asp:ListItem>
                                    </asp:DropDownList>    
                                </div>
                    </div>
                    <div class="col-md-12 text-center">
                        <asp:LinkButton ID="btn_search" runat="server" OnClick="btnSearch_Click" CssClass="btn btn-default"><span class="glyphicon glyphicon-search"></span> Search</asp:LinkButton>
                        <asp:LinkButton ID="btn_Clear" runat="server" OnClick="btnClear_Click" CssClass="btn btn-default"><span class="glyphicon glyphicon-refresh"></span> Clear</asp:LinkButton>
                        <asp:Button ID="btnSearchView0" runat="server" Text="Search" CssClass="btn btn-default" OnClick="btnSearchView0_Click" Visible="False" />
                    </div>

                    <div class="col-md-12">
                        <asp:GridView ID="grdView0" runat="server" DataKeyNames="ReqJoin_ID" Width="100%" AutoGenerateColumns="False" CssClass="table table-hover" GridLines="None" ShowHeaderWhenEmpty="true" OnRowDataBound="grdView0_RowDataBound" OnRowCommand="grdView0_RowCommand">
                               <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#6B696B"></HeaderStyle>
                            <Columns>
                                <asp:TemplateField HeaderText="">
                                    <ItemStyle VerticalAlign="top" HorizontalAlign="Center" />
                                    <HeaderTemplate>
                                        <center></center>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:LinkButton runat="server" ToolTip="Approve" Visible="false" CommandName="Approve" CommandArgument='<%#Eval("ReqJoin_ID")%>' ID="lnkApprove">
                                <span class="glyphicon glyphicon-check" aria-hidden="true"></span>
                                        </asp:LinkButton>
                                        <asp:LinkButton runat="server" ToolTip="More detail" CommandName="Detail" CommandArgument='<%#Eval("ReqJoin_ID")%>' ID="lnkDetail">
                                <span class=" glyphicon glyphicon-list-alt" aria-hidden="true"></span>
                                        </asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        <center>First Name</center>
                                    </HeaderTemplate>
                                    <ItemStyle VerticalAlign="top" HorizontalAlign="Center" />
                                    <ItemTemplate><%# Eval("FirstName")%></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        <center>Last Name</center>
                                    </HeaderTemplate>
                                    <ItemStyle VerticalAlign="top" HorizontalAlign="Center" />
                                    <ItemTemplate><%# Eval("LastName")%></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        <center>Join Date</center>
                                    </HeaderTemplate>
                                    <ItemStyle VerticalAlign="top" HorizontalAlign="Center" />
                                    <ItemTemplate><%# CDate(Eval("JoinDate")).ToString("dd MMM yyyy")%></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        <center>Expire Date</center>
                                    </HeaderTemplate>
                                    <ItemStyle VerticalAlign="top" HorizontalAlign="Center" />
                                    <ItemTemplate><%# CDate(Eval("ExpireDate")).ToString("dd MMM yyyy")%></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        <center>Status</center>
                                    </HeaderTemplate>
                                    <ItemStyle VerticalAlign="top" HorizontalAlign="Center" />
                                    <ItemTemplate><%# Eval("Status")%></ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </div>
                </div>
            </div>

        </asp:View>
        <asp:View ID="view1" runat="server">


            <div class="row">

                <div class="col-md-8 col-md-offset-2">
                    <div class="panel panel-default" style="margin-bottom: 60px;">
                        <div class="panel-heading">
                            Request Info
                        </div>
                        <div class="panel-body">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>First Name</label>
                                    <asp:Label ID="lblFName" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Last Name :</label>
                                    <asp:Label ID="lblLName" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Mobile Phone :</label>
                                    <asp:Label ID="lblMobile" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Home Phone :</label>
                                    <asp:Label ID="lblHomePhone" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Email :</label>
                                    <asp:Label ID="lblEmail" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Credit Card :</label>
                                    <asp:Label ID="lblCreditCard" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label>Address :</label>
                                    <asp:Label ID="lblAddress" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                    <div class="col-md-6">
                                        <div class="form-group has-feedback">
                                            <label>Join Date</label>
                                            <asp:TextBox ID="txtJoinDateView1" runat="server" CssClass="form-control" OnTextChanged="txtJoinDateView1_TextChanged" AutoPostBack="true"></asp:TextBox>
                                            <span class="glyphicon glyphicon-calendar form-control-feedback" aria-hidden="true"></span>
                                            <ajax:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtJoinDateView1" Format="dd MMM yyyy"></ajax:CalendarExtender>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label>Expire Date</label>
                                            <asp:Label ID="lblExpireDate" runat="server" CssClass="form-control-static"></asp:Label>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                        <div class="panel-footer">
                            <div class="form-group">
                                <label>Status :</label>
                                <asp:DropDownList ID="ddlStatus" runat="server" CssClass="form-control" OnSelectedIndexChanged="ddlStatus_SelectedIndexChanged" AutoPostBack="true">
                                    <asp:ListItem Value="APPROVED" Text="Approve"></asp:ListItem>
                                    <asp:ListItem Value="REJECT" Text="Reject"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="form-group" id="divReject" runat="server" visible="false">
                                <label>Reason :
                                    <asp:RequiredFieldValidator ID="rqRejectReason" runat="server" ErrorMessage="Please enter reject reason." Display="Dynamic" ControlToValidate="txtRejectReason" ValidationGroup="Reason" CssClass="text-danger" Enabled="false"></asp:RequiredFieldValidator></label>
                                <asp:TextBox ID="txtRejectReason" runat="server" CssClass="form-control" TextMode="MultiLine" Rows="3"></asp:TextBox>
                            </div>

                            <div class="form-group">
                                <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="btn btn-default" OnClick="btnSave_Click" OnClientClick="return confirm('Make sure to approve this request?');" />
                                <asp:Button ID="btnCamcel" runat="server" Text="Cancel" CssClass="btn btn-default" OnClick="btnCamcel_Click" />
                            </div>
                        </div>
                    </div>
                </div>

            </div>

            <asp:HiddenField ID="hdfReqID" runat="server" />

        </asp:View>


    </asp:MultiView>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
    <script type="text/javascript">
        ActiveMenuIndex(0);
    </script>
</asp:Content>
